/*
** 2140.c
** 
** Made by (seakage2h)
** Login   <seakage2h@seakage2h-ubuntu>
** 
** Started on  Sat Oct 11 15:59:45 2008 seakage2h
** Last update Sun May 12 01:17:25 2002 Speed Blue
*/

/* #include "2140.h" */
#include <stdio.h>

int main()
{
     int N, x, nc;

     scanf("%d", &N);

     for(x = 2, nc = 1; (x+1)*x/2 <= N; x++)
	  if ( (x*(x-1)/2 - N%x)%x == 0)
	       nc++;

     printf("%d\n", nc);

     return 0;
}

